package cn.oyjg.sys.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.oyjg.base.dao.BaseDao;
import cn.oyjg.base.service.BaseServiceImpl;
import cn.oyjg.sys.dao.UserDao;
import cn.oyjg.sys.entity.User;
import cn.oyjg.sys.service.IUserService;
@Service("userService")
public class UserServiceImpl extends BaseServiceImpl<User> implements IUserService {
	
	/**
	 * 计算游戏时间
	 */
	public void calcGameTim(User user){
		//如果用户的游戏时间为空则根据组来决定
		if(user.getGametime()==null || user.getGametime().equals("")){
			
		}else{
			
		}
	}
	
	public User login(String uname,String pwd,Integer type){
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("username", uname);
		map.put("pwd", pwd);
		map.put("type", type);
		return userDao.login(map);		
	}

	public BaseDao<User> getBaseDao() {
		return userDao;
	}

	@Autowired
	private UserDao userDao;
}	  
